package com.jmemoir.safe.paramsattack.controller;

import com.jmemoir.common.dto.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试控制层
 *
 * @author Tellsea
 * @date 2023/8/14
 */
@Slf4j
@RestController
@RequestMapping("/paramsAttackTest")
public class ParamsAttackTestController {

    @GetMapping("/testGet1")
    public Result<Long> testGet1(@RequestParam("id") Long id) {
        return Result.success("测试 GET 一个参数的方法", id);
    }
}
